/**
 * 公告设置api
 */
import instance from "@/utils/request";

//公告列表分页查询
export function GetNoticeListApi(data = {}) {
    return instance.request({
        method: "post",
        url: "/notice/list/page",
        data
    })
}

//公告新增
export function AddNoticel(data = {}) {
    return instance.request({
        method: "post",
        url: "/notice/add",
        data
    })
}

//删除分页数据
export function DelNoticel(noticeId) {
    return instance.request({
        method: "DELETE",
        url: `/notice/del/${noticeId}`,
    })
}

//公告是否推荐
export function changeQNoticel(noticeId, isRecommend) {
    return instance.request({
        method: "get",
        url: `/notice/recommend/${noticeId}/${isRecommend}`,
    })
}

//公告详情编辑回显
export function EchoQNoticel(noticeId) {
    return instance.request({
        method: "get",
        url: `/notice/get/${noticeId}`,
    })
}

//公告编辑
export function EditQNoticel(data) {
    return instance.request({
        method: "post",
        url: `/notice/edit`,
        data
    })
}